package org.yw;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.yw.utils.RedisUtil;

import javax.annotation.Resource;

/**
 * Created By YU WEI on 2020.09.07
 */
@RestController
public class Test {
    @Resource
    private RedisUtil redisUtil;

    @GetMapping("test")
    public String test(){
        redisUtil.setKey("yujing","123456");
        redisUtil.Lock("yujing", "123", 100)
        redisUtil.unLock("yujing");
        return "success";
    }
}
